package gui.symbols;

import java.util.Map;

public class Symbol implements Comparable<Symbol>{
  private Integer field;
  private String name;
  
  public Symbol(Map.Entry<Integer, String> entry){
    this(entry.getValue(), entry.getKey());
  }
  
  public Symbol(String name, Integer field){
    this.name = name;
    this.field = field;
  }
  
  public Integer getField() {
    return field;
  }

  public String getName() {
    return name;
  }

  public int compareTo(Symbol o) {
    return name.compareToIgnoreCase(o.getName());
  }
  
}
